Pop

Note: This statement is not available in the Add Statement dialog box or the Statements pane.

Returns the last value in a JSONArray and then removes it.

Syntax

Pop()

Supported objects

JSONArray

Return value

Value Description
Value Last value in the JSONArray.

Example

jsonArray = JSONNewArray()

' Appends 1 and 2 to the end of the array

jsonArray.Push(1)

jsonArray.Push(2)

' Appends 3 to the end of the array

jsonArray.SetValue(2, 3)

' Returns 3 and removes it from the array

intVal = jsonArray.Pop()

PrintLn("Last value removed from array: " & intVal)